<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>学校与志愿组合管理</title>
	<meta name="decorator" content="default"/>
</head>
<body>
<div class="main-content">
    <tags:breadcrumb menuId="d13a995abb1f4a09bea8de9f03276f37" />
    <div class="page-content">
        <form:form id="inputForm" modelAttribute="volunteerSchool" action="" method="post" class="form-horizontal">
            <form:hidden path="id"/>
            <div class="form-group">
                <label class="col-sm-2 no-padding-right control-label">志愿组合编码：</label>
                <div class="col-sm-4">
                    <form:input path="vId" htmlEscape="false" maxlength="32" class="col-sm-10 "/>
                </div>
            </div><hr>
            <div class="form-group">
                <label class="col-sm-2 no-padding-right control-label">学校国标：</label>
                <div class="col-sm-4">
                    <form:input path="schoolCode" htmlEscape="false" maxlength="20" class="col-sm-10 "/>
                </div>
            </div><hr>
            <div class="form-group">
                <label class="col-sm-2 no-padding-right control-label">学校名称：</label>
                <div class="col-sm-4">
                    <form:input path="schoolName" htmlEscape="false" maxlength="64" class="col-sm-10 "/>
                </div>
            </div><hr>
            <div class="form-group">
                <label class="col-sm-2 no-padding-right control-label">学校优先级：</label>
                <div class="col-sm-4">
                    <form:input path="schoolLevel" htmlEscape="false" maxlength="6" class="col-sm-10 "/>
                </div>
            </div><hr>
            <div class="form-group">
                <label class="col-sm-2 no-padding-right control-label">推荐类型：</label>
                <div class="col-sm-4">
                    <form:input path="schoolType" htmlEscape="false" maxlength="4" class="col-sm-10 "/>
                </div>
            </div><hr>
            <div class="form-group">
                <label class="col-sm-2 no-padding-right control-label">录取概率：</label>
                <div class="col-sm-4">
                    <form:input path="lqRate" htmlEscape="false" class="col-sm-10  number"/>
                </div>
            </div><hr>
            <div class="form-actions">
                <shiro:hasPermission name="volunteer:volunteerSchool:edit"><input id="btnSubmit" class="btn btn-primary" type="button" value="保 存"/>&nbsp;</shiro:hasPermission>
                <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
            </div>
        </form:form>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function() {
        $("#name").focus();
        $("#btnSubmit").click(function(){
            if($("#inputForm").valid()){
                var url = "${ctx}/volunteer/volunteerSchool/save";
                $.post(url,$("#inputForm").serialize(),function(data){
                    if(data.success){
                        showNote("success",function(){
                            window.location.href = "${ctx}/volunteer/volunteerSchool/list";
                        },data.msg,"center");
                    }else{
                        showNote("error",function(){return false;},data.msg,"center");
                    }
                });
            }else{
                showNote("error",function(){return false;},"输入有误，请正确输入数据","center");
            }
        });
    });
</script>
</body>
</html>